/*!
 ************************************************************************
 * 应用模块导入文件
 *
 * Copyright 2019-? eastcom
 * @file: mod
 * @date: 20190710
 *
 *
 ************************************************************************/
import eastcomJs from "ecjrjs/lib/ecjrjs";
import * as ecModule from "ecjr-module";


let bcr = null;
let idcard = null;


try {
  console.log("opensocket");
  console.log(ecModule.init);
  ecModule.init(window).then(() => {
    ecModule.traceOn(window);
    Trace(EC_INFO, "============= start ===================");
    console.log(window.qtObjects);
    bcr = new eastcomJs.Bcr(window.qtObjects.bcr, "bcr");
    idcard = new eastcomJs.IdCard(window.qtObjects.IdCard, "idcard");
  });
} catch (error) {
  console.log(error);
}

// debugger;
// console.log(eastcomJs);
// console.log(window);
// console.log(window.qtObjects);
// const bcr = new eastcomJs.Bcr(window.qtObjects.bcr, "bcr");
// const com = new eastcomJs.Common(window.qtObjects.common, "Common");
// const prr = new eastcomJs.Prr(window.qtObjects.rec, "prr"); // 凭条打印模块
// const prj = new eastcomJs.Prj(window.qtObjects.jnl, "prj"); // 流水打印模块
// const fpc = new eastcomJs.Fpc(window.qtObjects.fpc, "fpc"); // 指纹模块
// const crd = new eastcomJs.Crd(window.qtObjects.crd, "crd"); // CRD模块
// const crd2 = new eastcomJs.Crd(window.qtObjects.crd2, "crd2"); // CRD2模块
// const ukey = new eastcomJs.Ukey(window.qtObjects.ukey, "ukey"); // Ukey模块
// const cam = new eastcomJs.Cam(window.qtObjects.cam, "cam");
// const idcard = new eastcomJs.IdCard(window.qtObjects.IdCard, "idcard");
// const idc = new eastcomJs.Idc(window.qtObjects.idc, "idc");
// const idc2 = new eastcomJs.Idc(window.qtObjects.idc2, "idc2");
// const icc = new eastcomJs.Idc(window.qtObjects.icc, "icc");
// const pin = new eastcomJs.Pin(window.qtObjects.pin, "pin");
// const glt = new eastcomJs.Glt(window.qtObjects.glt, "glt"); // 指示灯模块
// const dor = new eastcomJs.Door(window.qtObjects.dor, "door"); // 门模块
// const idt = new eastcomJs.Idt(window.qtObjects.idt, "idt"); // 指示器模块
// const snr = new eastcomJs.Snr(window.qtObjects.snr, "snr"); // 传感器模块

// const a4print = new eastcomJs.Pbk(window.qtObjects.a4, "pbk");
// const dataMgr = new eastcomJs.DataMgr(window.qtObjects.datamgr, "dataMgr");
// const transfer = new eastcomJs.Transfer(window.qtObjects.transfer, "Transfer"); // 文件传输
// const ime = new eastcomJs.Ime(window.qtObjects.ime, "Ime");
// const facecam = new eastcomJs.FaceCam(window.qtObjects.facecam, "cam");
// const emv = new eastcomJs.Emv(window.qtObjects.emv, "Emv");
// // const emv = new ecjs.Emv(window.qtObjects.emv, 'Emv');
// const prd = new eastcomJs.Prd(window.qtObjects.a4, "prd");
// const cim = new eastcomJs.Cim(window.qtObjects.cim, "cim");
// const cdm = new eastcomJs.Cdm(window.qtObjects.cdm, "cdm");
// const coin = new eastcomJs.Cdm(window.qtObjects.coin, "coin");
// const billRecord = new eastcomJs.BillRecord(window.qtObjects.sn, "BillRecord");
// const pbk = new eastcomJs.Pbk(window.qtObjects.pbk, "pbk");
// const checkout = new eastcomJs.CheckOut(window.qtObjects.chkout, "chkout");
// const checkIn = new eastcomJs.CheckIn(window.qtObjects.chkin, "chkin");
export {
  // idc,
  // pin,
  // glt,
  // com,
  bcr,
  // prr,
  idcard,
  // icc,
  // prj,
  // a4print,
  // fpc,
  // ukey,
  // dataMgr,
  // transfer,
  // crd2,
  // crd,
  // cam,
  // ime,
  // facecam,
  // idc2,
  // emv,
  // prd,
  // dor,
  // idt,
  // snr,
  // cim,
  // cdm,
  // coin,
  // billRecord,
  // pbk,
  // checkout,
  // checkIn,
};
